<template>
  <div class="home">
    <input
      type="file"
      :onChange="toolIconFileUpload"
      name="file"
      multiple="multiple"
      id="file"
    />
  </div>
</template>

<script>
export default {
  name: '',
  components: {},
  props: {},
  data() {
    return {};
  },
  computed: {},
  watch: {},
  created() {},
  mounted() {},
  methods: {
    toolIconFileUpload(e) {
      // let file = e.target.files[0];
      console.log(e);
      // axios
      //   .post('/Ip21-8083/ecommerce-ops-web-application/user/accountLogin', {
      //     phone: '18845687340',
      //     password: 'e10adc3949ba59abbe56e057f20f883e',
      //   })
      //   .then((res) => {
      //     const { jwtToken } = res.data.data;
      //     axios
      //       .post(
      //         '/Ip21-1210/ecommerce-ops-web-application/oss/stsAssume',
      //         {},
      //         {
      //           headers: { Authorization: jwtToken },
      //         },
      //       )
      //       .then((res) => {
      //         const { accesskeyid, accesskeysecret, token } = res.data.data;
      //         const openoss = new OSS({
      //           accessKeyId: accesskeyid,
      //           accessKeySecret: accesskeysecret,
      //           stsToken: token,
      //           secure: true,
      //           region: 'oss-cn-hangzhou',
      //           bucket: 'odc-test',
      //         });
      //         openoss.multipartUpload(file.name, file, {}).then((res) => {
      //           console.log(res);
      //           console.log('成功');
      //         });
      //       });
      //   });
    },
  },
};
</script>

<style scoped lang="scss">
</style>

